﻿(function (module) {
	module.controllers.add({
		name: 'menu',
		actions: {
			index: function (m) {
				module.view('menu/index', { items: m });
			},
			breadcrumb: function (m) {
				module.view('menu/breadcrumb', { items: m });
			},
			menuitemclicked: function (moduleName) {
				jmvc.module(moduleName).load();
			}
		}
	});

	module.views.add({
		name: 'menu/index',
		url: 'jmvc-modules/menu/views/index.html',
		templateId: '#menu-template',
		el: '#menu'
	});

	module.views.add({
		name: 'menu/breadcrumb',
		url: 'jmvc-modules/menu/views/index.html',
		templateId: '#menu-breadcrumb',
		el: '#menu-breadcrumb'
	});

})(jmvc.module('menu'));



